#include <iostream>
using namespace std;
int time=1;


double func(double x,double a,double b,double c){
	return a*x*x+b*x+c;
}



int main(){
	double a,b,c;
	cin>>a>>b>>c;
	double l,r;
	cin>>l>>r;
	double x1,x2;
	double y1,y2;
	do{
		cout<<"["<<time<<"]"<<endl;
		time++;
		x1 = (r-l)/3+l;
		x2 = 2*(r-l)/3+l;
		y1 = func(x1,a,b,c);
		y2 = func(x2,a,b,c);
		if(y1 < y2)
			r = x2;
		else
			l = x1;
	}while(r-l > 0.001);
	cout<<l;
	return 0;
}
